#ifndef __TM1637_H
#define __TM1637_H

#include "stm32f1xx_hal.h"
extern unsigned char Digital_tube_code_table[];
extern unsigned char disp_num[];
#define SDA_GPIO_PORT    GPIOB
#define SCL_GPIO_PORT    GPIOB
#define SDA_Pin    		 GPIO_PIN_11
#define SCL_Pin    		 GPIO_PIN_10

#define ADDRESS_PLUS   	0x40        //40 地址自加模式    
#define ADDRESS_FIXED 	0x44        //44 固定地址模式
#define DISPLAY_OFF 	0x80
#define DISPLAY_ON 	    0x88

/* max31865模块结构体 */
typedef struct tm1637 {
    /* 私有成员 */
 
    /* 对外公有成员 */
    void (*init)(void);
    void (*set_bright)(unsigned char level);
    void (*display)(uint8_t address, uint8_t value);
    void (*clear)(void);
    void (*off)(void);
} tm1637_t;

void tm1637_creat(tm1637_t *tm1637);
#endif





